<!DOCTYPE html>
<html>
      <head>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <title>徽章</title>
            <link rel="stylesheet" href="https://cdn.staticfile.net/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
            <script src="https://cdn.staticfile.net/jquery/3.2.1/jquery.min.js"></script>
            <script src="https://cdn.staticfile.net/popper.js/1.15.0/umd/popper.min.js"></script>
            <script src="https://cdn.staticfile.net/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
      </head>
      <body>
            <!-- 不同颜色徽章 -->
            <span class="badge badge-primary">主要</span>
            <span class="badge badge-secondary">次要</span>
            <span class="badge badge-success">成功</span>
            <span class="badge badge-danger">危险</span>
            <span class="badge badge-warning">警告</span>
            <span class="badge badge-info">信息</span>
            <span class="badge badge-light">浅色</span>
            <span class="badge badge-dark">深色</span>

            <!-- 药丸徽章 -->
            <span class="badge badge-pill badge-primary">主要</span>
            <span class="badge badge-pill badge-secondary">次要</span>
            <span class="badge badge-pill badge-success">成功</span>
            <span class="badge badge-pill badge-danger">危险</span>
            <span class="badge badge-pill badge-warning">警告</span>
            <span class="badge badge-pill badge-info">信息</span>
            <span class="badge badge-pill badge-light">浅色</span>
            <span class="badge badge-pill badge-dark">深色</span>

            <!-- 嵌入徽章 -->
            <button type="button" class="btn btn-primary">Message
                  <span class="badge badge-light">4</span>
            </button>
      </body>
</html>